<template>
  <div class="dialog">
    <el-dialog :title="title" :visible.sync="visible" :close-on-click-modal="false" width="65%">
      <el-form :model="createForm" label-width="120px" label-suffix=":" ref="createForm">
        <el-table border style="margin-top: 10px" ref="multipleTable" stripe height="250px" :data="goodsList">
          <el-table-column label="序号" type="index" width="50" align="center"></el-table-column>
          <el-table-column label="结算项名称" prop="itemName" align="center" show-overflow-tooltip></el-table-column>
          <el-table-column label="结算财务类型" prop="itemType" align="center" show-overflow-tooltip></el-table-column>
          <el-table-column label="数量" prop="number" align="center" show-overflow-tooltip></el-table-column>
          <el-table-column label="结算金额" prop="amount" align="center" show-overflow-tooltip></el-table-column>
          <el-table-column label="时间" prop="createTime" align="center" show-overflow-tooltip></el-table-column>
        </el-table>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="closeNetWorker()">关 闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  storeSettlementInfoDetail
} from '@/api/businessExtend'
export default {
  name: 'StoreSettlementDialog',
  data () {
    return {
      title: '结算详情信息',
      visible: false,
      createForm: {},
      goodsList: [],
    }
  },
  created () { },
  mounted () { },
  methods: {
    edit (val) {
      this.createForm = Object.assign({}, val)
      this.initGoods()
      this.visible = true
    },
    initGoods () {
      let param = {
        settlementId: this.createForm.id
      }
      storeSettlementInfoDetail(param).then((res) => {
        if (res.data.code == 0) {
          this.goodsList = res.data.data.records
        }
      }
      )
    },
    closeNetWorker () {
      this.createForm = {}
      this.goodsList = []
      this.visible = false
    }
  }
}
</script>
<style scoped lang="less"></style>
